//
//  MyCollectionViewController.m
//  qq
//
//  Created by 王成龙 on 2016/11/23.
//  Copyright © 2016年 wcl. All rights reserved.
//

#import "MyCollectionViewController.h"
#import "Mycoll.h"
@interface MyCollectionViewController ()

@end

@implementation MyCollectionViewController

static NSString * const reuseIdentifier = @"Cell";


- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Register cell classes
    [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:reuseIdentifier];
    UICollectionViewFlowLayout *flow = (UICollectionViewFlowLayout *)self.collectionView.collectionViewLayout;
    flow.minimumLineSpacing = 20;
    flow.minimumInteritemSpacing = 20;
    // Do any additional setup after loading the view.
}
-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
    
    return 3;
    
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
    return 4;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath

{
    //static NSString *ID = @"on";
    Mycoll *cell =[collectionView dequeueReusableCellWithReuseIdentifier:@"on"forIndexPath:indexPath];
    cell.backgroundColor =[UIColor redColor];
    cell.lebel.text = @"心";
    cell.image.image = [UIImage imageNamed:@"习近平.png"];
    return cell;
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
